package o;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;

import o.dge.d;

public abstract class cxr {
    private static BroadcastReceiver ˎ = new SafeBroadcastReceiver() {
        public void onReceiveMsg(Context context, Intent intent) {
            if ("hiappbase.share.activity.onCreate".equals(intent.getAction())) {
                int i = i.ˏ;
                String userId = UserSession.getInstance().getUserId();
                String stringExtra = intent.getStringExtra("shareurl");
                String stringExtra2 = intent.getStringExtra("share.appidtype");
                String stringExtra3 = intent.getStringExtra("share.fromwhere");
                if ("Reserve".equals(stringExtra2) || "orderappdetail".equals(stringExtra2)) {
                    dgh.onEvent(new d(context, i).ˏ("04|" + userId + '|' + stringExtra).ˋ());
                } else if ("appdetail".equals(stringExtra3)) {
                    dgh.onEvent(new d(context, i).ˏ("01|" + userId + '|' + stringExtra).ˋ());
                } else if ("award".equals(stringExtra3)) {
                    dgh.onEvent(new d(context, i).ˏ("02|" + userId + '|' + stringExtra).ˋ());
                } else {
                    dgh.onEvent(new d(context, i).ˏ("03|" + userId + '|' + stringExtra).ˋ());
                }
            }
        }
    };

    public static void ˊ() {
        cxk.ˏ(cxl.class);
        cxk.ˏ(cxq.class);
        cxk.ˏ(cxn.class);
        cxk.ˏ(cxj.class);
        cxk.ˏ(cxm.class);
        ll.ˏ(ContentManager.getInstant().getContext()).ˏ(ˎ, new IntentFilter("hiappbase.share.activity.onCreate"));
    }

    public static void ˏ() {
        ll.ˏ(ContentManager.getInstant().getContext()).ˋ(ˎ);
    }

    public static void ˏ(int i) {
        Intent intent = new Intent("share_result_broadcast");
        intent.putExtra("share_status_key", i);
        ll.ˏ(ContentManager.getInstant().getContext()).ˋ(intent);
    }
}
